//
//  DRFoodPairingHeaderView.m
//  DoctorRen
//
//  Created by Lemon on 2018/11/22.
//

#import "DRFoodPairingHeaderView.h"
#import <Masonry/Masonry.h>

@interface DRFoodPairingHeaderView()


@end

@implementation DRFoodPairingHeaderView

-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        [self setupSubviews];
        self.contentLabel.text = @"全天2085千卡，建议早餐30%，625千卡，建议加餐后摄入量20%-25%，417-521千卡";
        self.contentLabel.text = @"全天2085千卡，建议午餐40%，834千卡，建议加餐后摄入量30%-35%，625-729千卡";
        self.contentLabel.text = @"全天2085千卡，建议晚餐30%，625千卡，建议加餐后摄入量20%-25%，417-521千卡";
        self.contentLabel.text = @"全天2085千卡，建议加餐5%-10%，625千卡，建议加餐后摄入量20%-25%，169-335千卡";
    }
    return  self;
}

-(void) setupSubviews{
    self.backgroundView.backgroundColor = [UIColor whiteColor];
    self.titleLB = [[UILabel alloc] init];
    [self.titleLB setFont:[UIFont systemFontOfSize:15]];
    [self addSubview:self.titleLB];
    
    self.contentLabel = [[UILabel alloc] init];
    [self.contentLabel setFont:[UIFont systemFontOfSize:13]];
    self.contentLabel.numberOfLines = 0;
    [self.contentLabel setTextColor:Text_Gray];
    [self addSubview:self.contentLabel];
    
    [self.titleLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
    }];
    
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.titleLB.mas_bottom).mas_offset(10);
        make.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
    }];
    
//    self.changeButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
//    [self.changeButton setTitle:@"换一批" forState:(UIControlStateNormal)];
//    [self.changeButton setImage:[UIImage imageNamed:@"智能配餐_换一批"] forState:UIControlStateNormal];
//    [self.changeButton.titleLabel setFont:[UIFont systemFontOfSize:15]];
//    [self.changeButton setTitleColor:There_Green forState:UIControlStateNormal];
//    [self addSubview:self.changeButton];
//    
//    [self.changeButton mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.centerY.mas_equalTo(self.titleLB);
//        make.right.mas_equalTo(-20);
//        make.height.mas_equalTo(35);
//    }];
//    [self.changeButton setHidden:YES];
    
//    self.analyzeButton = [UIButton buttonWithType:UIButtonTypeCustom];
//    [self.analyzeButton setTitle:@"饮食分析" forState:(UIControlStateNormal)];
//    [self.analyzeButton setBackgroundColor:There_Green];
//    [self.analyzeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
//    [self addSubview:self.analyzeButton];
//    self.analyzeButton.titleLabel.font = [UIFont systemFontOfSize:15];
//    [self.analyzeButton mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.centerY.mas_equalTo(self.titleLB);
//        make.height.mas_equalTo(30);
//        make.width.mas_equalTo(100);
//        make.right.mas_equalTo(-20);
//    }];
//    self.analyzeButton.layer.cornerRadius = 15;
    
}



@end
